/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.ipti.br.tag.bo;

import org.ipti.br.tag.dao.QuestionsPersonFacade;
import org.ipti.br.tag.entity.QuestionsPerson;
import java.util.Calendar;
import javax.inject.Inject;
import javax.ejb.Stateless;
import java.util.List;

/**
 *
 * @author ipti
 */
@Stateless
public class QuestionsPersonBO {

    @Inject
    private QuestionsPersonFacade questionsPersonDAO;

    public QuestionsPersonFacade getQuestionsPersonDAO() {
        return questionsPersonDAO;
    }

    public void create(QuestionsPerson questionsPerson) {
        getQuestionsPersonDAO().create(questionsPerson);
    }

    public void edit(QuestionsPerson questionsPerson) {
        getQuestionsPersonDAO().edit(questionsPerson);
    }

    public void remove(QuestionsPerson questionsPerson) {
        getQuestionsPersonDAO().remove(questionsPerson);
    }

    public QuestionsPerson find(Object id) {
        return getQuestionsPersonDAO().find(id);
    }

    public List<QuestionsPerson> findAll() {
        return getQuestionsPersonDAO().findAll();
    }

    public void editForSynchronization(QuestionsPerson questionsPerson) {
        getQuestionsPersonDAO().editForSynchronization(questionsPerson);
    }

    public Boolean existsQuestionsPerson(Long questionID, Long personID) {
        Boolean exists = false;
        if (getQuestionsPersonDAO().findQuestionsPerson(questionID, personID) != null) {
            exists = true;
        }

        return exists;
    }

    public QuestionsPerson findQuestionsPerson(Long questionID, Long personID) {
        return getQuestionsPersonDAO().findQuestionsPerson(questionID, personID);
    }

    public List<QuestionsPerson> modifiedQuestionsPersonBetweenDate(Calendar initialDate, Calendar finalDate, Long serialNumber) {
        return getQuestionsPersonDAO().modifiedQuestionsPersonBetweenDate(initialDate, finalDate, serialNumber);
    }
}
